home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Files / XTND 1.3.6 / Translator Examples / MacWrite Translator / MacWrite.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-01  |  3.0 KB  |  126 lines  |  [TEXT/MPS ]

  1. /************************************************************************
  2. *                                                                        *
  3. *    MacWrite.h                                                            *
  4. *                                                                        *
  5. *    Header for the MacWrite v5.0 import and export translators.            *
  6. *                                                                        *
  7. *    Copyright © 1988, 89, 90, 91 Claris Corporation                        *
  8. *    All Rights Reserved                                                    *
  9. *                                                                        *
  10. *    Author: Richard Scorer                                                *
  11. *    Date:   13 April, 1988                                                *
  12. *                                                                        *
  13. ************************************************************************/
  14.  
  15. #ifndef _H_MacWriteHdr_
  16. #define _H_MacWriteHdr_
  17.  
  18.  
  19. #define    AFooter        0
  20. #define    AHeader        1
  21. #define    TheMainDoc    2
  22.  
  23.  
  24. typedef struct MacWriteWindow {        /* MacWrite's Window variables */
  25.     short    selStartPar;
  26.     short    selStartCh;
  27.     short    selEndPar;
  28.     short    selEndCh;
  29.     short    vertOffSet;
  30.     short    need2Redraw;
  31.     long    infoAryPos;
  32.     short    infoAryLength;
  33.     long    lineHeightAryPos;
  34.     short    lineHeightAryLength;
  35.     long    pageNumPos;
  36.     long    datePos;
  37.     long    timePos;
  38.     long    unused3639;
  39.     char    ovalRedraw;
  40.     char    lastOval;
  41.     short    activeStyle;
  42.     short    activeFont;
  43. } MacWriteWindow;
  44.  
  45.  
  46. typedef struct MWHeader {    /* MacWrite 5.0 header */
  47.     short    versionNo;
  48.     short    mainPars;
  49.     short    headerPars;
  50.     short    footerPars;
  51.     char    titlePage;
  52.     char    unused9;
  53.     char    scrapDisplay;
  54.     char    footerDisplay;
  55.     char    headerDisplay;
  56.     char    rulersHidden;
  57.     short    activeDoc;
  58.     short    startPageNum;
  59.     long    freeListPos;
  60.     short    freeListLen;
  61.     short    freeListAlloc;
  62.     char    unused2639[14];
  63.     TPrint    printRecord;
  64.     MacWriteWindow    window[3];
  65. } MacWriteHeader, **MacWriteHdrHandle;
  66.  
  67.  
  68. typedef    struct InfoStruct {    /* Information array */
  69.     short    paraHeight;
  70.     short    paraPagePosn;
  71.     long    paraHndl;
  72.     struct {
  73.         unsigned    long    justCode:8;
  74.         unsigned    long    paraFilePosn:24;
  75.     } Status;                /* Offset into file */
  76.     short    paraLen;        /* Length of paragraph data in bytes.  includes format runs... */
  77.     short    paraFmt;
  78. } InfoStruct;
  79.  
  80.  
  81. typedef struct FreeBlock { /* Free list array */
  82.     long    filePos;
  83.     long    blockSize;
  84. } FreeBlock;
  85.  
  86.  
  87. typedef struct FormatRun { /* What it say huh ? */
  88.     short    firstChar;
  89.     char    pointSize;
  90.     char    styleSetting;
  91.     short    fontNo;
  92. } FormatRun;
  93.  
  94.  
  95. typedef struct RulerParagraph { /* A ruler paragraph definition */
  96.     short    leftMargin;        /* Horiz co-ordinates.  1/80" from left - starting at 1"*/
  97.     short    rightMargin;    /* From left side of screen to right margin (1/80") */
  98.     char    justification;    /* 0,1,2 or 3 */
  99.     char    numTabs;        /* From 1-10 */
  100.     short    lineSpacing;
  101.     short    lineIndent;        /* From left of screen */
  102.     short    tabArray[10];    /* #pixels btwn left side & tab */
  103.     long    unused3033;
  104. } RulerParagraph;
  105.  
  106.  
  107. typedef struct PictureParagraph { /* A picture paragraph definition */
  108.     Rect    pictureSize;    /* size of the picture */
  109.     Picture    thePicture;        /* a standard QuickDraw Picture */
  110. } PictureParagraph;
  111.  
  112.  
  113. typedef struct MWFormat { /* A MacWrite format */
  114.     short            charPos;    /* first character affected by this format */
  115.     unsigned char    pointSize;    /* point size */
  116.     unsigned char    style;        /* standard style byte */
  117.     short            fontNumber;    /* font number */
  118. } MWFormat;
  119.  
  120.  
  121. typedef struct LineHeightArray
  122. {
  123.     char    heightInfo[6];
  124. } LineHeightArray;
  125.  
  126. #endif